2000
How can I change the visual appearance of the filter bar's close button (solid)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,14,0,00,00).operator DATE(),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutAllowSort(VARIANT_FALSE);
	var_Column->PutWidth(32);
	var_Column->PutFormatColumn(L"1 apos ``");
	var_Column->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::exFilterBarPromptVisible);
spG2antt1->PutBackground(EXG2ANTTLib::exFooterFilterBarButton,RGB(255,0,0));
spG2antt1->EndUpdate();

1999
Is it possible to prevent definitely showing the filter bar's close button

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,14,0,00,00).operator DATE(),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutAllowSort(VARIANT_FALSE);
	var_Column->PutWidth(32);
	var_Column->PutFormatColumn(L"1 apos ``");
	var_Column->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::exFilterBarPromptVisible);
spG2antt1->PutBackground(EXG2ANTTLib::exFooterFilterBarButton,-1);
spG2antt1->EndUpdate();

1998
Is it possible to show the close button only if there is a filter applied

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,14,0,00,00).operator DATE(),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutAllowSort(VARIANT_FALSE);
	var_Column->PutWidth(32);
	var_Column->PutFormatColumn(L"1 apos ``");
	var_Column->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::FilterBarVisibleEnum(EXG2ANTTLib::exFilterBarShowCloseIfRequired | EXG2ANTTLib::exFilterBarPromptVisible));
spG2antt1->EndUpdate();

1997
The control's filter bar is not closed once I click the close button (toggle)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,14,0,00,00).operator DATE(),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutAllowSort(VARIANT_FALSE);
	var_Column->PutWidth(32);
	var_Column->PutFormatColumn(L"1 apos ``");
	var_Column->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
	var_Items->PutLockedItemCount(EXG2ANTTLib::exBottom,1);
	long h = var_Items->GetLockedItem(EXG2ANTTLib::exBottom,0);
	var_Items->PutItemDivider(h,0);
	var_Items->PutCellValue(h,long(0),"<c><fgcolor=808080>Press the CTRL + F to turn on/off the control's filter bar. ALT + Up/Down moves the focus.");
	var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML);
spG2antt1->PutFilterBarCaption(L"`<r><fgcolor=808080>` + value");
spG2antt1->PutFilterBarPromptPattern(L"B");
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::FilterBarVisibleEnum(EXG2ANTTLib::exFilterBarCompact | EXG2ANTTLib::exFilterBarToggle | EXG2ANTTLib::exFilterBarSingleLine | EXG2ANTTLib::exFilterBarVisible | EXG2ANTTLib::exFilterBarPromptVisible));
EXG2ANTTLib::IColumnPtr var_Column1 = spG2antt1->GetColumns()->GetItem(long(0));
	var_Column1->PutFilterType(EXG2ANTTLib::exFilter);
	var_Column1->PutFilter(L"Item B");
spG2antt1->ApplyFilter();
spG2antt1->EndUpdate();

1996
How can I display the control's filter on a single line

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,14,0,00,00).operator DATE(),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutAllowSort(VARIANT_FALSE);
	var_Column->PutWidth(32);
	var_Column->PutFormatColumn(L"1 apos ``");
	var_Column->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->PutFilterBarCaption(L"len(value) ? `filter for: <fgcolor 808080>` + value  : `<fgcolor 808080>no filter`");
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::FilterBarVisibleEnum(EXG2ANTTLib::exFilterBarSingleLine | EXG2ANTTLib::exFilterBarVisible));
EXG2ANTTLib::IColumnPtr var_Column1 = spG2antt1->GetColumns()->GetItem(long(0));
	var_Column1->PutFilterType(EXG2ANTTLib::exFilter);
	var_Column1->PutFilter(L"Item A|Item B");
spG2antt1->ApplyFilter();
spG2antt1->EndUpdate();

1995
How can I display the control's filter on a single line (prompt-combined)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,14,0,00,00).operator DATE(),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutAllowSort(VARIANT_FALSE);
	var_Column->PutWidth(32);
	var_Column->PutFormatColumn(L"1 apos ``");
	var_Column->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->PutFilterBarCaption(L"`<r>` + value");
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::FilterBarVisibleEnum(EXG2ANTTLib::exFilterBarCompact | EXG2ANTTLib::exFilterBarSingleLine | EXG2ANTTLib::exFilterBarVisible | EXG2ANTTLib::exFilterBarPromptVisible));
EXG2ANTTLib::IColumnPtr var_Column1 = spG2antt1->GetColumns()->GetItem(long(0));
	var_Column1->PutFilterType(EXG2ANTTLib::exFilter);
	var_Column1->PutFilter(L"Item A|Item B");
spG2antt1->ApplyFilter();
spG2antt1->EndUpdate();

1994
How can I get the number of results after a filter is applied

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,14,0,00,00).operator DATE(),vtMissing,vtMissing);
}

// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
void OnClickG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->ClearFilter();
}

// FilterChange event - Occurs when the filter was changed.
void OnFilterChangeG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( L"Items.MatchItemCount" );
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetMatchItemCount()) );
	OutputDebugStringW( _bstr_t(spG2antt1->FormatABC(L"value < 0 ? `filter applied: ` + abs(value + 1) + ` result(s)` : `no filter`",spG2antt1->GetItems()->GetMatchItemCount(),vtMissing,vtMissing)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutAllowSort(VARIANT_FALSE);
	var_Column->PutWidth(32);
	var_Column->PutFormatColumn(L"1 apos ``");
	var_Column->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::exFilterBarPromptVisible);
spG2antt1->PutFilterBarPromptPattern(L"Item");
spG2antt1->EndUpdate();

1993
How can I programmatically clear the control's filter
// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,14,0,00,00).operator DATE(),vtMissing,vtMissing);
}

// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
void OnClickG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->ClearFilter();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutAllowSort(VARIANT_FALSE);
	var_Column->PutWidth(32);
	var_Column->PutFormatColumn(L"1 apos ``");
	var_Column->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::exFilterBarPromptVisible);
spG2antt1->PutFilterBarPromptPattern(L"B");
spG2antt1->EndUpdate();

1992
Is it possible to prevent closing the control's filter bar, so it is always shown (prompt-combined)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,14,0,00,00).operator DATE(),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutAllowSort(VARIANT_FALSE);
	var_Column->PutWidth(32);
	var_Column->PutFormatColumn(L"1 apos ``");
	var_Column->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->PutFilterBarPromptPattern(L"B");
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::FilterBarVisibleEnum(EXG2ANTTLib::exFilterBarVisible | EXG2ANTTLib::exFilterBarPromptVisible));
EXG2ANTTLib::IColumnPtr var_Column1 = spG2antt1->GetColumns()->GetItem(long(0));
	var_Column1->PutFilterType(EXG2ANTTLib::exFilter);
	var_Column1->PutFilter(L"Item B");
spG2antt1->ApplyFilter();
spG2antt1->EndUpdate();

1991
Is it possible to prevent closing the control's filter bar, so it is always shown (prompt)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,14,0,00,00).operator DATE(),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutAllowSort(VARIANT_FALSE);
	var_Column->PutWidth(32);
	var_Column->PutFormatColumn(L"1 apos ``");
	var_Column->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::exFilterBarPromptVisible);
spG2antt1->PutFilterBarPromptPattern(L"B");
spG2antt1->EndUpdate();

1990
Is it possible to prevent closing the control's filter bar, so it is always shown

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,14,0,00,00).operator DATE(),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Item")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutAllowSort(VARIANT_FALSE);
	var_Column->PutWidth(32);
	var_Column->PutFormatColumn(L"1 apos ``");
	var_Column->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->PutFilterBarCaption(L"len(value) = 0 ? `<fgcolor=808080>no filter` : value");
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::exFilterBarVisible);
EXG2ANTTLib::IColumnPtr var_Column1 = spG2antt1->GetColumns()->GetItem(long(0));
	var_Column1->PutFilterType(EXG2ANTTLib::exFilter);
	var_Column1->PutFilter(L"Item B");
spG2antt1->ApplyFilter();
spG2antt1->EndUpdate();

1989
What are the options to align the percent caption

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Clip");
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader));
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exRowLines);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,26,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task%Progress");
		var_Bar->PutShortcut(L"Task");
		var_Bar->PutPattern(EXG2ANTTLib::exPatternBox);
		var_Bar->PutColor(RGB(164,164,164));
		var_Bar->PutStartColor(RGB(240,240,240));
		var_Bar->PutEndColor(var_Bar->GetStartColor());
		var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsIncludeCaption | EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack));
		var_Bar->PutHeight(15);
		var_Bar->PutDef(EXG2ANTTLib::exBarPercent,double(0.5));
		var_Bar->PutDef(EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE);
		var_Bar->PutDef(EXG2ANTTLib::exBarPercentCaptionFormat,"<sha ;;0>%p%");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("no clip, (0-2)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarAlignPercentCaption,long(2));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarAlignPercentCaption,long(1));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarAlignPercentCaption,long(0));
	h = var_Items->AddItem("clip, inside (3-5)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarAlignPercentCaption,long(5));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarAlignPercentCaption,long(4));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarAlignPercentCaption,long(3));
	h = var_Items->AddItem("hide on min width, clip if not fit, inside (6-8)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarAlignPercentCaption,long(8));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarAlignPercentCaption,long(7));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarAlignPercentCaption,long(6));
	h = var_Items->AddItem("hide if not fit, no clip, inside (9-11)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarAlignPercentCaption,long(11));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarAlignPercentCaption,long(10));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarAlignPercentCaption,long(9));
	h = var_Items->AddItem("no clip, inside, outside (12-14)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarAlignPercentCaption,long(14));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarHAlignCaption,long(13));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarAlignPercentCaption,long(12));
	h = var_Items->AddItem("no clip, outside (16-18)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarAlignPercentCaption,long(18));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarAlignPercentCaption,long(17));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarAlignPercentCaption,long(16));
spG2antt1->EndUpdate();

1988
Is it possible to determine whether a bar is in the current display area

// BarResizing event - Occurs when a bar is moving or resizing.
void OnBarResizingG2antt1(long   Item,VARIANT   Key)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

// DateChange event - Occurs when the first visible date is changed.
void OnDateChangeG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

// FormatColumn event - Fired when a cell requires to format its caption.
void OnFormatColumnG2antt1(long   Item,long   ColIndex,VARIANT FAR*   Value)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	_variant_t s = spG2antt1->GetItems()->GetItemBar(Item,"A",EXG2ANTTLib::exBarStart);
	_variant_t e = spG2antt1->GetItems()->GetItemBar(Item,"A",EXG2ANTTLib::exBarEnd);
	_variant_t l = spG2antt1->FormatABC(L"A < B",e,spG2antt1->GetChart()->GetFirstVisibleDate(),vtMissing);
	_variant_t r = spG2antt1->FormatABC(L"A > B",s,spG2antt1->GetChart()->GetDateFromPoint(1,-1),vtMissing);
	Value = spG2antt1->FormatABC(L"( A or B ) ? `<fgcolor=C0C0C0>hidden` : `<b>visible`",l,r,vtMissing);
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void OnLayoutChangedG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Visible")));
	var_Column->PutFireFormatColumn(VARIANT_TRUE);
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAll);
	var_Chart->PutOverviewHeight(64);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
spG2antt1->PutSelBackColor(spG2antt1->GetBackColor());
spG2antt1->PutSelForeColor(spG2antt1->GetForeColor());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2018,8,3,0,00,00).operator DATE(),COleDateTime(2018,8,10,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2019,8,4,0,00,00).operator DATE(),COleDateTime(2019,8,12,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->PutSelectItem(var_Items->GetFocusItem(),VARIANT_TRUE);
spG2antt1->EndUpdate();

1987
How can I ensure that the bar fits the control's client area

// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	long h = spG2antt1->GetItems()->GetFocusItem();
	_variant_t k = spG2antt1->GetItems()->GetFirstItemBar(h);
	_variant_t s = spG2antt1->FormatABC(L"(A+B)/2",spG2antt1->GetItems()->GetItemBar(h,k,EXG2ANTTLib::exBarStart),spG2antt1->GetItems()->GetItemBar(h,k,EXG2ANTTLib::exBarEnd),vtMissing);
	spG2antt1->GetChart()->ScrollTo(s,long(1));
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2018,8,3,0,00,00).operator DATE(),COleDateTime(2018,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2019,8,4,0,00,00).operator DATE(),COleDateTime(2019,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(var_Items->GetFocusItem(),VARIANT_TRUE);
spG2antt1->EndUpdate();

1986
Is it possible to change the caption from a column without to remove the column and add it with the new caption
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"ColumnName")))->PutCaption(L"NewName");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"ColumnName")))->PutHTMLCaption(L"<b>New</b>Name");

1985
How can I display the bar's duration in days, minutes, and so so on

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Tasks")))->PutAllowSizing(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Duration")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarKey,"A");
		var_Column->PutFormatColumn(_bstr_t("trim((1:=int((0:=value)/365) ? =:1 + ` year(s) ` : ``)  + (1:=int((0:=(=:0 - (=:1*365)))/31) ? =:1 + ` month(s) ` : ``) + (1:=i") +
"nt((0:=(=:0 - (=:1*31)))/7) ? =:1 + ` week(s) ` : ``) + (1:=int((0:=(=:0 - (=:1*7)))/1) ? =:1 + ` day(s) ` : ``) + (1:=int((0:=(" +
"=:0 - =:1 + 1/24/60/60/2))*24) ? =:1 + ` hour(s) ` : ``) + (1:=int((0:=(=:0*24 - =:1))*60) ? =:1 + ` min(s) ` : ``) + (1:=int((0" +
":=(=:0*60 - =:1))*60) ? =:1 + ` sec(s)` : ``))");
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,12,30,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
	var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task");
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAll);
	var_Chart->PutOverviewHeight(64);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exSecond);
	var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,12,31,0,00,00).operator DATE(),COleDateTime(2002,1,7,0,00,00).operator DATE(),"A",vtMissing);
	h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,1,0,00,00).operator DATE(),COleDateTime(2002,2,14,0,00,00).operator DATE(),"A",vtMissing);
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,2,10,00,00).operator DATE(),COleDateTime(2002,1,2,12,00,00).operator DATE(),"A",vtMissing);
	h = var_Items->AddItem("Task 4");
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,4,8,30,30).operator DATE(),"A",vtMissing);
spG2antt1->EndUpdate();

1984
How can I change the background color for checked items (EBN color, frame)

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->PutDefaultItemHeight(22);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABUkIQAAYAQGKIcBiAKBQAGYBIJDEMQ3DjAUBjMK4ZwTC4AIQjCK4JDKHYJRpHEZgLBMJAAGIZYhhUYRUiYMkiJBGGDIDiGGI2SJAcbTVIEc") +
"x9EyUJSgSTJOjCMokTTIU4TTLYASbJafJJhWSaAiyMouDIOMg1BDNIw/Hika6jOgKUisNJXRzWIBTbDlOQ3JqnbCjOQRSrQBoNDAMAiiaKlbwJPK9RoieQXfwUAJrXJc" +
"FqXFSLVxNBKAQEBA=");
	var_Appearance->Add(1,"CP:2 1 1 -1 -1");
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%CS0 = 1",vtMissing);
	var_ConditionalFormat->PutBackColor(0x1000000);
	var_ConditionalFormat->PutChartBackColor(var_ConditionalFormat->GetBackColor());
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1983
How can I change the caption of the checked items (sample 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutSelBackColor(spG2antt1->GetBackColor());
spG2antt1->PutSelForeColor(spG2antt1->GetForeColor());
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
	var_Column->PutFormatColumn(L"%CS0 = 1 ? `<bgcolor=000000><fgcolor=FFFFFF> ` + value + ` </fgcolor></bgcolor>` : value");
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1982
How can I change the caption of the checked items (sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
	var_Column->PutFormatColumn(L"value + (%CS0 = 1 ? `<r><fgcolor=808080>(checked)` : ``)");
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1981
How can I change the font for the checked items

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutDefaultItemHeight(22);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%CS0 = 1",vtMissing);
	/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
	/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'stdole' for the library: 'OLE Automation'

	#import <stdole2.tlb>
*/
	stdole::FontPtr f = ::CreateObject(L"StdFont");
		f->PutName(spG2antt1->GetFont()->GetName());
		f->PutSize(_variant_t(long(12)));
	var_ConditionalFormat->PutFont(IFontDispPtr(((stdole::FontPtr)(f))));
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1980
How can I bold the checked items

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%CS0 = 1",vtMissing);
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1979
How can I change the foreground color for checked items

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%CS0 = 1",vtMissing);
	var_ConditionalFormat->PutForeColor(RGB(255,128,128));
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1978
How can I change the background color for checked items (solid color)

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%CS0 = 1",vtMissing);
	var_ConditionalFormat->PutBackColor(RGB(255,128,128));
	var_ConditionalFormat->PutChartBackColor(var_ConditionalFormat->GetBackColor());
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1977
How can I change the color for checked Task bars

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%CS0 = 1",vtMissing);
	var_ConditionalFormat->PutApplyToBars(L"Task,Summary");
	var_ConditionalFormat->PutBarColor(RGB(255,0,0));
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1976
I have defined "NonWorkingHours" for the Gantt, and the "exBarWorkingCount" properly excludes these hours as long as the Gantt is using "exDay" or "exHour" as the level unit. However when displaying a quarter or a year, I'm changing the unit to "exWeek", but then the "NonWorkingHours" are no longer excluded from the bars "exBarWorkingCount" and displays the wrong value

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Tasks")))->PutAllowSizing(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Working")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarKey,"A");
		var_Column->PutFormatColumn(_bstr_t("((1:=int(0:=( 24*int(value) + (value - int(value) + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((") +
"1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')");
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader));
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
	var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task");
	var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,3,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->GetLevel(0)->PutLabel("<%ddd%>");
	var_Chart->GetLevel(1)->PutLabel("<%hh%>");
	var_Chart->PutNonworkingHours(16761855);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAll);
	var_Chart->PutOverviewHeight(64);
	var_Chart->PutAllowOverviewZoom(EXG2ANTTLib::exAlwaysZoom);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,4,0,00,00).operator DATE(),COleDateTime(2002,1,8,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
	h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,4,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart1 = spG2antt1->GetChart();
	var_Chart1->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart1->ScrollTo(var_Chart1->GetFirstVisibleDate(),long(1));
spG2antt1->EndUpdate();

1975
Is it possible to customize the editor selection colour of the built in text editor, from standard blue to black

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutSelBackColor(RGB(0,0,0));
spG2antt1->PutSelForeColor(RGB(255,255,255));
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Edit")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::MaskType);
	var_Editor->PutMask(L";;;rich");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	var_Items->AddItem("Just a text");
	var_Items->AddItem("");
spG2antt1->EndUpdate();

1974
Is it possible to customize the editor selection colour of the built in dropdown editor, from standard blue to black

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSelBackColor(RGB(0,0,0));
spG2antt1->PutSelForeColor(RGB(255,255,255));
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"DropDown")))->GetEditor();
	var_Editor->AddItem(1,L"This is just the first item",vtMissing);
	var_Editor->AddItem(2,L"This is just the second item",vtMissing);
	var_Editor->AddItem(3,L"This is just the third item",vtMissing);
	var_Editor->PutEditType(EXG2ANTTLib::DropDownType);
	var_Editor->PutMask(L";;;rich");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	var_Items->AddItem("Just a text");
	var_Items->AddItem("");
spG2antt1->EndUpdate();

1973
When I display the chart in the daily view, the histogram shows correctly the data while if the chart displays the data in weekly or monthly view, the histogram shows no data or incorrectly. What can be the problem

// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area.
void OnOverviewZoomG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetChart()->PutResizeUnitScale(EXG2ANTTLib::exDay);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Effort")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(21));
	var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowOverviewZoom(EXG2ANTTLib::exAlwaysZoom);
	var_Chart->PutOverviewZoomCaption(L"|||<img>3</img>Month|Third|<img>2</img>Week|<img>1</img>Day|||");
	var_Chart->PutLabel(EXG2ANTTLib::exYear,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exHalfYear,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exQuarterYear,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exThirdMonth,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exHour,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exMinute,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exSecond,L"");
	var_Chart->PutOverviewZoomUnit(64);
	var_Chart->PutLevelCount(2);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(128);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAll);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverload);
		var_Bar->PutHistogramCriticalValue(3);
		var_Bar->PutHistogramItems(-7);
		var_Bar->PutHistogramGridLinesColor(RGB(192,192,192));
		var_Bar->PutHistogramRulerLinesColor(RGB(0,0,1));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,23,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellValue(h1,long(1),long(4));
	h1 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h1,"Task",COleDateTime(2005,6,24,0,00,00).operator DATE(),COleDateTime(2005,6,26,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellValue(h1,long(1),long(3));
	h1 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h1,"Task",COleDateTime(2005,6,27,0,00,00).operator DATE(),COleDateTime(2005,6,29,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellValue(h1,long(1),long(2));
	h1 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h1,"Task",COleDateTime(2005,6,30,0,00,00).operator DATE(),COleDateTime(2005,7,2,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellValue(h1,long(1),long(1));
spG2antt1->EndUpdate();

1972
The BeforeExpandItem event is fired when clicking the drop down filter button. What we can do to prevent that
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
void OnBeforeExpandItemG2antt1(long   Item,VARIANT FAR*   Cancel)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( L"BeforeExpandItem" );
	OutputDebugStringW( L"Item" );
	OutputDebugStringW( L"ColumnFromPoint" );
	OutputDebugStringW( _bstr_t(spG2antt1->GetColumnFromPoint(-1,-1)) );
	OutputDebugStringW( L"ColumnFromPoint return -1, if the user clicks the +/- glitch, else it returns the index of the column where the click occurs." );
	spG2antt1->GetItems()->InsertItem(Item,vtMissing,"new child");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Items")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutItemHasChildren(var_Items->InsertItem(vtMissing,vtMissing,"Group 1"),VARIANT_TRUE);
	var_Items->PutItemHasChildren(var_Items->InsertItem(vtMissing,vtMissing,"Group 2"),VARIANT_TRUE);
spG2antt1->EndUpdate();

1971
How do I change the drop down filter icon/button (black)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQ") +
"gmPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYTh" +
"dr4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA");
spG2antt1->PutBackground(EXG2ANTTLib::exCursorHoverColumn,-1);
spG2antt1->PutBackground(EXG2ANTTLib::exHeaderFilterBarButton,0x1000000);
spG2antt1->PutBackground(EXG2ANTTLib::exBackColorFilter,RGB(0,0,1));
spG2antt1->PutBackground(EXG2ANTTLib::exForeColorFilter,RGB(255,255,255));
spG2antt1->PutDescription(EXG2ANTTLib::exFilterBarExclude,L"<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>");
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::None2);
spG2antt1->PutBackColorHeader(RGB(0,0,0));
spG2antt1->PutForeColorHeader(RGB(255,255,255));
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisible);
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Filter")));
	var_Column->PutFilterList(EXG2ANTTLib::FilterListEnum(EXG2ANTTLib::exShowExclude | EXG2ANTTLib::exShowCheckBox));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutAllowSort(VARIANT_FALSE);
	var_Column->PutAllowDragging(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
	var_Chart->PutLevelCount(2);
	var_Chart->PutBackColorLevelHeader(spG2antt1->GetBackColorHeader());
	var_Chart->PutForeColorLevelHeader(spG2antt1->GetForeColorHeader());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("One");
	var_Items->AddItem("Two");
	var_Items->AddItem("Three");
spG2antt1->EndUpdate();

1970
How do I change the z-order of the bars (percent)

// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	_variant_t b = spG2antt1->GetChart()->GetBarFromPoint(-1,-1);
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(i,b,EXG2ANTTLib::exBarToolTip)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->PutDefaultItemHeight(52);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,10,10,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutMarkTodayColor(var_Chart->GetBackColor());
	var_Chart->GetBars()->Add(L"Task%Progress")->PutShortcut(L"Task");
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Copy(L"Task",L"T1");
		var_Bar->PutColor(RGB(255,0,0));
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar->PutDef(EXG2ANTTLib::exBarPercent,double(0.25));
		var_Bar->PutDef(EXG2ANTTLib::exBarPercentColor,var_Bar->GetColor());
		var_Bar->PutDef(EXG2ANTTLib::exBarOffset,long(10));
		var_Bar->PutDef(EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE);
		var_Bar->PutDef(EXG2ANTTLib::exBarPercentCaptionFormat,"<font ;6><b>%p%</b>");
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"T2");
		var_Bar1->PutHeight(26);
		var_Bar1->PutDef(EXG2ANTTLib::exBarCaption,"<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>");
		var_Bar1->PutDef(EXG2ANTTLib::exBarVAlignCaption,long(16));
		var_Bar1->PutDef(EXG2ANTTLib::exBarPercent,double(0.25));
		var_Bar1->PutDef(EXG2ANTTLib::exBarPercentColor,var_Bar1->GetColor());
		var_Bar1->PutDef(EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE);
		var_Bar1->PutDef(EXG2ANTTLib::exBarPercentCaptionFormat,"<font ;6><b>%p%</b>");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task");
	var_Items->AddBar(h1,"T1",COleDateTime(2017,10,15,0,00,00).operator DATE(),COleDateTime(2017,10,25,0,00,00).operator DATE(),"2",vtMissing);
	var_Items->PutItemBar(h1,"2",EXG2ANTTLib::exBarData,"Bar A");
	var_Items->PutItemBar(h1,"2",EXG2ANTTLib::exBarToolTip,"Bar A <b>Over</b> Bar B");
	var_Items->AddBar(h1,"T2",COleDateTime(2017,10,18,0,00,00).operator DATE(),COleDateTime(2017,10,22,0,00,00).operator DATE(),"1",vtMissing);
	var_Items->PutItemBar(h1,"1",EXG2ANTTLib::exBarData,"Bar B");
	var_Items->PutItemBar(h1,"1",EXG2ANTTLib::exBarToolTip,"Bar B <b>Under</b> Bar A");
	h1 = var_Items->AddItem("Task");
	var_Items->AddBar(h1,"T1",COleDateTime(2017,10,15,0,00,00).operator DATE(),COleDateTime(2017,10,25,0,00,00).operator DATE(),"1",vtMissing);
	var_Items->PutItemBar(h1,"1",EXG2ANTTLib::exBarData,"Bar A");
	var_Items->PutItemBar(h1,"1",EXG2ANTTLib::exBarToolTip,"Bar A <b>Under</b> Bar B");
	var_Items->AddBar(h1,"T2",COleDateTime(2017,10,18,0,00,00).operator DATE(),COleDateTime(2017,10,22,0,00,00).operator DATE(),"2",vtMissing);
	var_Items->PutItemBar(h1,"2",EXG2ANTTLib::exBarData,"Bar B");
	var_Items->PutItemBar(h1,"2",EXG2ANTTLib::exBarToolTip,"Bar B <b>Over</b> Bar A");
spG2antt1->EndUpdate();

1969
How do I change the z-order of the bars

// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	_variant_t b = spG2antt1->GetChart()->GetBarFromPoint(-1,-1);
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(i,b,EXG2ANTTLib::exBarToolTip)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->PutDefaultItemHeight(52);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,10,10,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutMarkTodayColor(var_Chart->GetBackColor());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Copy(L"Task",L"T1");
		var_Bar->PutColor(RGB(255,0,0));
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"T2");
		var_Bar1->PutHeight(25);
		var_Bar1->PutDef(EXG2ANTTLib::exBarCaption,"<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>");
		var_Bar1->PutDef(EXG2ANTTLib::exBarVAlignCaption,long(16));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task");
	var_Items->AddBar(h1,"T1",COleDateTime(2017,10,15,0,00,00).operator DATE(),COleDateTime(2017,10,25,0,00,00).operator DATE(),"2",vtMissing);
	var_Items->PutItemBar(h1,"2",EXG2ANTTLib::exBarData,"Bar A");
	var_Items->PutItemBar(h1,"2",EXG2ANTTLib::exBarToolTip,"Bar A <b>Over</b> Bar B");
	var_Items->AddBar(h1,"T2",COleDateTime(2017,10,18,0,00,00).operator DATE(),COleDateTime(2017,10,22,0,00,00).operator DATE(),"1",vtMissing);
	var_Items->PutItemBar(h1,"1",EXG2ANTTLib::exBarData,"Bar B");
	var_Items->PutItemBar(h1,"1",EXG2ANTTLib::exBarToolTip,"Bar B <b>Under</b> Bar A");
	h1 = var_Items->AddItem("Task");
	var_Items->AddBar(h1,"T1",COleDateTime(2017,10,15,0,00,00).operator DATE(),COleDateTime(2017,10,25,0,00,00).operator DATE(),"1",vtMissing);
	var_Items->PutItemBar(h1,"1",EXG2ANTTLib::exBarData,"Bar A");
	var_Items->PutItemBar(h1,"1",EXG2ANTTLib::exBarToolTip,"Bar A <b>Under</b> Bar B");
	var_Items->AddBar(h1,"T2",COleDateTime(2017,10,18,0,00,00).operator DATE(),COleDateTime(2017,10,22,0,00,00).operator DATE(),"2",vtMissing);
	var_Items->PutItemBar(h1,"2",EXG2ANTTLib::exBarData,"Bar B");
	var_Items->PutItemBar(h1,"2",EXG2ANTTLib::exBarToolTip,"Bar B <b>Over</b> Bar A");
spG2antt1->EndUpdate();

1968
How do I get the duration/working count of the bar (sample 6,excrd)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(48);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines);
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,12,26,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task:Split");
		var_Bar->PutShortcut(L"Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarToolTip,"<%=%263%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarOffset,long(-12));
	var_Chart->PutColumnsFormatLevel(L"1,2/3");
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutAlignment(EXG2ANTTLib::LeftAlignment);
	var_Column->PutFormatColumn(L"value + `d`");
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
	var_Column1->PutVisible(VARIANT_FALSE);
	var_Column1->PutAlignment(EXG2ANTTLib::RightAlignment);
	var_Column1->PutFormatColumn(L"value + `w`");
EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working-Period")));
	var_Column2->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(263));
	var_Column2->PutVisible(VARIANT_FALSE);
	var_Column2->PutAlignment(EXG2ANTTLib::CenterAlignment);
	var_Column2->PutFormatColumn(L"((value replace `\\r\\n` with `,`) replace `#` with ``) replace ` ` with ``");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,11,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,12,31,0,00,00).operator DATE(),COleDateTime(2002,1,13,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1967
How do I get the duration/working count of the bar (sample 5)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemMaxHeight(Item,64);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutBackColorAlternate(RGB(240,240,240));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,1,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task:Split");
		var_Bar->PutShortcut(L"Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarToolTip,"<%=%263%>");
	var_Chart->PutColumnsFormatLevel(L"1,2");
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Task")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutWidth(48);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
	var_Column1->PutVisible(VARIANT_FALSE);
	var_Column1->PutAlignment(EXG2ANTTLib::LeftAlignment);
EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working")));
	var_Column2->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
	var_Column2->PutVisible(VARIANT_FALSE);
	var_Column2->PutAlignment(EXG2ANTTLib::RightAlignment);
EXG2ANTTLib::IColumnPtr var_Column3 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working-Period")));
	var_Column3->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(263));
	var_Column3->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,4,0,00,00).operator DATE(),COleDateTime(2002,1,16,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1966
How do I get the duration/working count of the bar (sample 4)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,12,26,0,00,00).operator DATE());
	var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task");
	var_Chart->PutColumnsFormatLevel(L"1,2");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Task")))->PutWidth(48);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutAlignment(EXG2ANTTLib::LeftAlignment);
	var_Column->PutFormatColumn(L"value + `d`");
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
	var_Column1->PutVisible(VARIANT_FALSE);
	var_Column1->PutAlignment(EXG2ANTTLib::RightAlignment);
	var_Column1->PutFormatColumn(L"value + `w`");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1965
How do I get the duration/working count of the bar (sample 3)

// BarResizing event - Occurs when a bar is moving or resizing.
void OnBarResizingG2antt1(long   Item,VARIANT   Key)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		OutputDebugStringW( var_Items->GetCellCaption(Item,long(0)) );
		OutputDebugStringW( L"Working" );
		OutputDebugStringW( _bstr_t(var_Items->GetItemBar(Item,Key,EXG2ANTTLib::exBarWorkingCount)) );
		OutputDebugStringW( var_Items->GetCellCaption(Item,long(0)) );
		OutputDebugStringW( L"Duration" );
		OutputDebugStringW( _bstr_t(var_Items->GetItemBar(Item,Key,EXG2ANTTLib::exBarDuration)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,12,26,0,00,00).operator DATE());
	var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Task")))->PutWidth(48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1964
How do I get the duration/working count of the bar (sample 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,12,26,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task:Split");
		var_Bar->PutShortcut(L"Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%258%>w");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar->PutDef(EXG2ANTTLib::exBarExtraCaption,"<%=%513%>d");
		var_Bar->PutDef(EXG2ANTTLib::exBarExtraCaptionHAlign,long(16));
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Task")))->PutWidth(48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1963
How do I get the duration/working count of the bar (sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,1,0,00,00).operator DATE());
	var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Task")))->PutWidth(48);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1962
How can I draw a solid frame around the the focusing item

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->PutDefaultItemHeight(20);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->PutRenderType(-1);
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABOkGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeDYMiSNoYDJCM4wH") +
"IURRJFCUJSGWQpTgSIgyT5HFIxXKoASbJabZLhWS6EpWOotTbIQQRYCkEyfKKfZyGURZQqOKA1DBZErWTJESRFJqLazgO4LAhyQYrVgAErzVKVCRNOqbJzADApdpGQJT" +
"ULDNTQHRFIyhOSnIRrWbMAhid6JUZiVT4dBOIYhSYANAqCwLFqrDJmWrpV5WZjlZ47V6BdAyXJsIrmFJEXaOGhyDDlGybSDZYryfZhUziUw4XjbWwZDqPF6DKTTdSGLR" +
"EE8WZVlURZvDaep3C+AY8kAYRgGCCBJECUhjDoHROEYWgoAGTQ1CEEx9lGMY0CQUYSnuZQDBGBYFlOH5+H+igGAKAJgEgFgGgGVgDn4CoCmCSA2A6A5hAgDgQgSYRIE4" +
"EoFGGCBiBeBhhkgPgbgcYgICoH4IGGWIOCSBhiGiHgVgoYooFoAoLGIWI+DCCgjCiTgrgII4ImYOoOmOSJ2AYOpWlQDQBICA=");
spG2antt1->PutShowFocusRect(VARIANT_TRUE);
spG2antt1->PutBackground(EXG2ANTTLib::exShowFocusRect,0x1000000);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,1);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"P1")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1961
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->PutDefaultItemHeight(20);
spG2antt1->PutShowFocusRect(VARIANT_TRUE);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->PutRenderType(-1);
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeCRUgyJI3RgMUIzV") +
"AcRRFEiUJQlIZZCjOAw0SIMU7xZRcNxsACnaZnCR4NiuRYiUhOcqzRIQIQ4CiEahqOgJbDUJYwWZKAyjBY8XTZFCSJCpeJ6egOc5jRxQUp1WAEXx3GSsJKvCZ5cADBY+" +
"VLQNS0JBtMSTKSLaiuWoIJqCPaDRheWKQJh1NSnLqEcjyYANDxDCZlWzAYxWTZ2Uz7N7PbB0HY4DyPGKZYrfESVRbQcZNS6nNigPI9XhfGq6VjRe63ZaOaYpWrnOJqTR" +
"WjOKYujWdZ2BGO5lkuBAAkmcQkDmDBEAwEQJCgGhMGcQ4pkiSxGAAOYmkQIhvkYNg2gSCgyj+LI4GIMIwF2XQoAYAoAmASAWAaAZgggJgKFiT54DYDoDmECBGBKBJgGg" +
"TgWgWYRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChiigYgsgsYYYBYMIKCMKJOCuDRjGiOgLg6Y5InYPoPmQCAkmsXAQDQBCAg=");
	var_Appearance->Add(3,"CP:2 -3 0 3 0");
spG2antt1->PutBackground(EXG2ANTTLib::exShowFocusRect,0x3010101);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,1);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"P1")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1960
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->PutShowFocusRect(VARIANT_TRUE);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABHoDg6AADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFiCCQwSDKEjyCKcGRHF6MI6gOYpCgOIYjRJNIASV") +
"AceAAGaUZrjSgobjmOYhAJCLqhYIgASXJqLaBlOCaAieSc+QhjQJIJoeCZXU5TFg1BTsOhqEqcRiseaRVDCaIJWzbdYWLDdNQHHKYLjnWorbpSJZ5XjNEySDQkMS9PrE" +
"J7vST8FBCdAABLJUB2BR9RwxRafKpnWwJDpmCaOQLXEB5DK1PyVMTKYrtGy7GrIAJxWxbV4UHh+QABOzIMAvHKJMwvHYcUZne5XVLeF41HbONogPaJZyIAK2cLROq6Xo" +
"7GEcJZEcLASB4DwvgWUZlE6AQQhKAYkkYdA6hyDIwHgSoqFwQgmnsYxjGgSIiBOTpSEiAwRgOJI7j4JAHA6U5wm0MpPlOBIjD8TZiGYCICiCGAuA6AxhAgMgSgOYQ4DY" +
"Bg/g6cw1n+ABOmMMJ9DmCwjnScw4RsVJngkYh4hoKIKmKKI2CmC5ikiQgqgiT5jhyMw8g4QwIn0OIKEiCJhD8DwTGyfA7k0WQOEWEQkGkJhIhKZB5DYSoTiSCQEn4PQO" +
"COXJcCeIJjliaIQk0aRyF4O5llmAhfhgZhJg4ZoYiaAxYn4PZOhOZJaCUZYTiYQw1mcOZUm+HQnHmWh4h6Z4pnYeYfk0eYsmqG4nAgNJ2DqD5DkCWoiGiOgqgyI5omoR" +
"oNiSaQKFKEojCaM4ugSFhOjkAJcieKgDkaH4oioGoOiaKRqgqEoqDddwyhuAxPgOMJ8DyDZqk6NYtCsapmjiLprHqdo6i+K5K1oPhOlqPgKD4DpjnII4yiOewuk6MxtA" +
"sMpSjObQ7EaT4wk6ewYn0PgPAiCJkjeLgDk6X44i4G4OmaORuguEpqDkLAzkaWg+E8GIUmaPIvEOVpzj2Lxbl6eo+G+S5in4OYPmOaJyjuTwjnYWpBg6DAjAqQZwkwJw" +
"NkKcJsEcEJCDBEpaD6Dw8BiapGjGSgfB2RpxmyBwgkicZ8haBw/g+M5TBcPQPlOXJskscp8jsMJMnMLJXDGTZzEyYw2kwMoDlcFw9i2M4/EGUJPg0CxFlENBtCcSJSnQ" +
"fQ0m+SgPHsaJ7lALZLG6XZVHWDRfFqVY1k0ZxdladYTnifJUGaeAWAeMnSGcGWgBObJ3lWbwdjKW5cHcTZPHaLkN4GxXDlFqFsA4uRbBOGAFAEIzAsDEFOBkfYqR4D6A" +
"OBEYo8QuBvAmMceInBDgcD0JwOIqQyJ1DMAwG4IANDnHSMoK4QhOgMBGNEIQvQWAdGenETIswGiddsAAQAgCAgA==");
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABeEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADDFIBQSLAYROGSDJBGODJDjWGIeQLOEhQH") +
"IMRxPE6UYLhWYpBDKPYcUbGc7yBBMVwGf59XzACoKSheQIVSDQkw6Fo6NYhAxHALyNRkBy8f60KjtGpodDUJYvW5JYyjBZ8EznOqbJBkeJ7BgOe5NQjaD72VgdWQJFSW" +
"JajWYYJDOJY2ZAAE5TVINEwxJbDaylChIdxaF6WAzZEBhBYoATPNLBMrhWqKDw2XaQWBCOgwHYeR5LU7BdRwbIrRq2eAAXbcVyXfDddZlBK+QA0SK9lRVTKvJZmKgBWw" +
"1COSxmAAGw4kcNx1iKFBiCAfQsG8lJemucg7nsXpUHOOxrm+DI3jOH4XAOBx2nscw0j2HhPG4L5uGEVIECQCBCEUAYkGMHQHFGSBlGaAxkEgQgTGCVBsDYQhCgQJZrHK" +
"UggGEShkFGNgIlsNpPnMHJHD+TADAIJIJiIWIeCqChikiIgmgiD5zHyXxgiACJKCuC4jHiZgtg6I4IlkCQwkwOIonMPJjEkFhGhGZBpA4KoMBCGJuEiE5lAkGg7hMY4J" +
"EYVoUCUNAOE6FZl0KWQACWOR2GKF5mBmChchkJRZhoXYaCKKYqGuDglEmNhuhWZpIiYc4dCcCRqGmHZlgm2YxAwSQKESHwkFkKgpiAIAIH4PIimOOg2DiChoiQJRRD+T" +
"ZDHCfwyAyCgyg+JpiioYJ/DgDgIlECQ6lwRAEICA=");
	var_Appearance->Add(3,"CP:2 -2 0 2 0");
spG2antt1->PutSelBackColor(0x1000000);
spG2antt1->PutSelForeColor(RGB(0,0,0));
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,1);
spG2antt1->PutBackground(EXG2ANTTLib::exShowFocusRect,0x3ff0000);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"P1")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1959
How can I display the start/end margins of bars, when cursor hovers it like a tooltip

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"exBarToolTip");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"<b><%=%9 + '/' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Bar.Def"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Bar.Def"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K1",vtMissing);
	long h = var_Items->AddItem("Items.ItemBar");
	var_Items->AddBar(h,"Unknown",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),"K",vtMissing);
	var_Items->PutItemBar(h,"K",EXG2ANTTLib::exBarToolTip,"Start:<%=%1%><br>End:<%=%2%>");
spG2antt1->EndUpdate();

1958
Is it possible to define different kinds of summary bars with using the EBN files

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->PutRenderType(-16777216);
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwH") +
"IERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6" +
"STCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKp" +
"FHIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQha" +
"XQIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC");
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQG") +
"h+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKf" +
"aZACj4arKejrRDCMAggI=");
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar->PutColor(RGB(1,0,0));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->GetItem("Summary");
		var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar1->PutColor(0x2000000);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long hSummaryJ = var_Items->AddItem("Summary A");
	var_Items->AddBar(hSummaryJ,"Summary",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),"J",vtMissing);
	long hTaskJ = var_Items->InsertItem(hSummaryJ,vtMissing,"Task A.1");
	var_Items->AddBar(hTaskJ,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"J1",vtMissing);
	hTaskJ = var_Items->InsertItem(hSummaryJ,vtMissing,"Task A.2");
	var_Items->AddBar(hTaskJ,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"J2",vtMissing);
	var_Items->DefineSummaryBars(hSummaryJ,"J",-1,"<*>");
	long hSummaryK = var_Items->AddItem("Summary B");
	var_Items->AddBar(hSummaryK,"Summary",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),"K",vtMissing);
	long hTaskK = var_Items->InsertItem(hSummaryK,vtMissing,"Task B.1");
	var_Items->AddBar(hTaskK,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	hTaskK = var_Items->InsertItem(hSummaryK,vtMissing,"Task B.2");
	var_Items->AddBar(hTaskK,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->DefineSummaryBars(hSummaryK,"K",-1,"<*>");
	var_Items->PutItemBar(0,"<K*>",EXG2ANTTLib::exBarColor,long(255));
	long hSummaryZ = var_Items->AddItem("Summary B");
	var_Items->AddBar(hSummaryZ,"Summary",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),"Z",vtMissing);
	long hTaskZ = var_Items->InsertItem(hSummaryZ,vtMissing,"Task B.1");
	var_Items->AddBar(hTaskZ,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"Z1",vtMissing);
	hTaskZ = var_Items->InsertItem(hSummaryZ,vtMissing,"Task B.2");
	var_Items->AddBar(hTaskZ,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"Z2",vtMissing);
	var_Items->DefineSummaryBars(hSummaryZ,"Z",-1,"<*>");
	var_Items->PutItemBar(hSummaryZ,"Z",EXG2ANTTLib::exBarColor,long(16842496));
	var_Items->PutItemBar(0,"<Z1>",EXG2ANTTLib::exBarColor,long(50266112));
	var_Items->PutItemBar(0,"<Z2>",EXG2ANTTLib::exBarColor,long(33554176));
	var_Items->PutExpandItem(0,VARIANT_TRUE);
spG2antt1->EndUpdate();

1957
How can I display the week-number in ISO8601 format

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2007,12,12,0,00,00).operator DATE());
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutUnitScale(EXG2ANTTLib::exWeek);
	var_Chart->GetLevel(0)->PutFormatLabel(L"value + `<r><off -4><fgcolor=808080><font ;6>` + year(dvalue)");
	var_Chart->GetLevel(1)->PutFormatLabel(L"(value = 1 ? `<bgcolor=000000><fgcolor=FFFFFF>` : ``) + value");
	var_Chart->PutWeekNumberAs(EXG2ANTTLib::exISO8601WeekNumber);
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
spG2antt1->EndUpdate();

1956
I have a column right-aligned. How can I display its check box aligned to the right, as it appears to the left of the cell's caption

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutColumnAutoResize(VARIANT_TRUE);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exVLines);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Left")));
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutWidth(96);
		var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->PutFormatColumn(L"0 pos `A-Z`");
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Center")));
		var_Column1->PutHeaderAlignment(EXG2ANTTLib::CenterAlignment);
		var_Column1->PutAlignment(var_Column1->GetHeaderAlignment());
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutWidth(96);
		var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column1->PutFormatColumn(L"0 pos `A-Z`");
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Right")));
		var_Column2->PutHeaderAlignment(EXG2ANTTLib::RightAlignment);
		var_Column2->PutAlignment(var_Column2->GetHeaderAlignment());
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutWidth(96);
		var_Column2->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column2->PutFormatColumn(L"0 pos `A-Z`");
		var_Column2->PutDef(EXG2ANTTLib::exCellDrawPartsOrder,"caption,check,icon,icons,picture");
	var_Columns->Add(L"");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1);
	var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1);
	var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1);
spG2antt1->EndUpdate();

1955
Can I display the column's multiple-lines caption vertically oriented (method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderHeight(48);
spG2antt1->PutColumnAutoResize(VARIANT_TRUE);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"And others ...");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column->PutHTMLCaption(L"First Column");
		var_Column->PutHeaderVertical(VARIANT_TRUE);
		var_Column->PutWidth(36);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(8));
		var_Column->PutPosition(0);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column1->PutHTMLCaption(L"<c><b>Second Column");
		var_Column1->PutHeaderVertical(VARIANT_TRUE);
		var_Column1->PutWidth(36);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column1->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(8));
		var_Column1->PutPosition(1);
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column2->PutHTMLCaption(L"<r>Third Column");
		var_Column2->PutHeaderVertical(VARIANT_TRUE);
		var_Column2->PutWidth(36);
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column2->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(8));
		var_Column2->PutPosition(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1);
	var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1);
	var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1);
spG2antt1->EndUpdate();

1954
Can I display the column's multiple-lines caption vertically oriented (method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderHeight(48);
spG2antt1->PutHeaderSingleLine(VARIANT_FALSE);
spG2antt1->PutColumnAutoResize(VARIANT_TRUE);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"And others ...");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"First Column")));
		var_Column->PutHeaderVertical(VARIANT_TRUE);
		var_Column->PutWidth(36);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(8));
		var_Column->PutPosition(0);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Second Column")));
		var_Column1->PutHeaderBold(VARIANT_TRUE);
		var_Column1->PutHeaderVertical(VARIANT_TRUE);
		var_Column1->PutWidth(36);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column1->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(8));
		var_Column1->PutPosition(1);
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Third Column")));
		var_Column2->PutHeaderVertical(VARIANT_TRUE);
		var_Column2->PutWidth(36);
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column2->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(8));
		var_Column2->PutPosition(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1);
	var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1);
	var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1);
spG2antt1->EndUpdate();

1953
Can I display the column's caption vertically oriented (method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderHeight(48);
spG2antt1->PutColumnAutoResize(VARIANT_TRUE);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"And others ...");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column->PutHTMLCaption(L"First");
		var_Column->PutHeaderVertical(VARIANT_TRUE);
		var_Column->PutWidth(20);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->PutPosition(0);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column1->PutHTMLCaption(L"<c><b>Second");
		var_Column1->PutHeaderVertical(VARIANT_TRUE);
		var_Column1->PutWidth(20);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column1->PutPosition(1);
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column2->PutHTMLCaption(L"<r>Third");
		var_Column2->PutHeaderVertical(VARIANT_TRUE);
		var_Column2->PutWidth(20);
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column2->PutPosition(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1);
	var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1);
	var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1);
spG2antt1->EndUpdate();

1952
Can I display the column's caption vertically oriented (method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderHeight(48);
spG2antt1->PutColumnAutoResize(VARIANT_TRUE);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"And others ...");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"First")));
		var_Column->PutHeaderVertical(VARIANT_TRUE);
		var_Column->PutWidth(20);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->PutPosition(0);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Second")));
		var_Column1->PutHeaderBold(VARIANT_TRUE);
		var_Column1->PutHeaderVertical(VARIANT_TRUE);
		var_Column1->PutWidth(20);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column1->PutPosition(1);
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Third")));
		var_Column2->PutHeaderVertical(VARIANT_TRUE);
		var_Column2->PutWidth(20);
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column2->PutPosition(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1);
	var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1);
	var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1);
spG2antt1->EndUpdate();

1951
How can I resize all task-bars 0-length

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx("itembar(513) = 0 and itembar(0) = `Task`",EXG2ANTTLib::exBarColor,long(255));
	var_Items->PutItemBarEx("itembar(513) = 0 and itembar(0) = `Task`",EXG2ANTTLib::exBarDuration,"value + 1");
spG2antt1->EndUpdate();

1950
Is it possible to mark items that holds items with 0-length (zero,empty, sample 3)
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
	var_Column->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%1 = 0",vtMissing);
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutBackColor(RGB(190,190,190));
	var_ConditionalFormat->PutChartBackColor(var_ConditionalFormat->GetBackColor());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,5,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1949
Is it possible to mark items that holds items with 0-length (zero,empty, sample 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx("itembar(513) = 0",EXG2ANTTLib::exBarCaption,"`zero-length`");
spG2antt1->EndUpdate();

1948
Is it possible to mark items that holds items with 0-length (zero,empty, sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx("itembar(513) = 0",EXG2ANTTLib::exBarBackgroundExt,"`[frame=RGB(255,0,0),framethick,pattern=6,patterncolor=RGB(255,0,0)]`");
	var_Items->PutItemBarEx("itembar(513) = 0",EXG2ANTTLib::exBarBackgroundExtInflate,"`-4,-4,4,4`");
spG2antt1->EndUpdate();

1947
How can I find how many tasks/bars of 0-length (zero,empty) do I have

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	OutputDebugStringW( _bstr_t(var_Items->GetItemBarEx("itembar(513) = 0",EXG2ANTTLib::exBarsCount)) );
spG2antt1->EndUpdate();

1946
How can I remove all bars from selected items

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutSelBackColor(RGB(240,240,240));
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
		var_Bar->PutOverlaidGroup(L"Task,Task-Diff");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"Task-Diff");
		var_Bar1->PutHeight(4);
		var_Bar1->PutColor(RGB(255,0,0));
		var_Bar1->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(16));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(h,"Task-Diff",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,14,0,00,00).operator DATE(),"P",vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	OutputDebugStringW( L"Bars before remove: " );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<*>",EXG2ANTTLib::exBarsCount)) );
	var_Items->PutItemBarEx("itemisselected",EXG2ANTTLib::exBarKey,"`toberemove` + value ");
	var_Items->RemoveBar(0,"<toberemove*>");
	OutputDebugStringW( L"Bars after remove: " );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<*>",EXG2ANTTLib::exBarsCount)) );
spG2antt1->EndUpdate();

1945
How can I remove task bars from selected items

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutSelBackColor(RGB(240,240,240));
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
		var_Bar->PutOverlaidGroup(L"Task,Task-Diff");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"Task-Diff");
		var_Bar1->PutHeight(4);
		var_Bar1->PutColor(RGB(255,0,0));
		var_Bar1->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(16));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(h,"Task-Diff",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,14,0,00,00).operator DATE(),"P",vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	OutputDebugStringW( L"Bars before remove: " );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<*>",EXG2ANTTLib::exBarsCount)) );
	var_Items->PutItemBarEx("itemisselected and itembar(0) = `Task`",EXG2ANTTLib::exBarKey,"`toberemove` + value ");
	var_Items->RemoveBar(0,"<toberemove*>");
	OutputDebugStringW( L"Bars after remove: " );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<*>",EXG2ANTTLib::exBarsCount)) );
spG2antt1->EndUpdate();

1944
How can I change the pattern for some bars only

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")))->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(h,long(0),1);
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(h,long(0),1);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx("cellstate(0)",EXG2ANTTLib::exBarPattern,long(6));
spG2antt1->EndUpdate();

1943
How do I apply the same effort to all bars

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(64);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(EXG2ANTTLib::exPatternBDiagonal);
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverAllocation);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarEffort,long(2));
spG2antt1->EndUpdate();

1942
How do I apply the same percent to all bars

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task%Progress");
		var_Bar->PutShortcut(L"Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarPercent,double(0.5));
spG2antt1->EndUpdate();

1941
How can I set the same duration for all bars

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarDuration,long(4));
spG2antt1->EndUpdate();

1940
How do I move all bars to end at the same date-time

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarMoveEnd,"#8/15/2017#");
spG2antt1->EndUpdate();

1939
How do I move all bars to start at the same date-time

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarMoveStart,"#8/2/2017#");
spG2antt1->EndUpdate();

1938
How do I apply a new color for some bars, while others should be shown with a different color

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutSelBackColor(RGB(240,240,240));
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
		var_Bar->PutOverlaidGroup(L"Task,Task-Diff");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"Task-Diff");
		var_Bar1->PutHeight(4);
		var_Bar1->PutColor(RGB(255,0,0));
		var_Bar1->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(16));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(h,"Task-Diff",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,14,0,00,00).operator DATE(),"P",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarColor,"cellcaption(0) like `*2` ? 0x0000FF : 0x00FF00");
spG2antt1->EndUpdate();

1937
How do I hide some bars, and show others

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutSelBackColor(RGB(240,240,240));
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
		var_Bar->PutOverlaidGroup(L"Task,Task-Diff");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"Task-Diff");
		var_Bar1->PutHeight(4);
		var_Bar1->PutColor(RGB(255,0,0));
		var_Bar1->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(16));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(h,"Task-Diff",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,14,0,00,00).operator DATE(),"P",vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx("-1",EXG2ANTTLib::exBarTransparent,"itembar(0) = `Task` ? 0 : 100");
spG2antt1->EndUpdate();

1936
I like how ItemBarEx works, the question is how can I remove the bars based on the same criteria

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	OutputDebugStringW( L"Bars before remove: " );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<*>",EXG2ANTTLib::exBarsCount)) );
	var_Items->PutItemBarEx("cellcaption(0) like `*2 *3`",EXG2ANTTLib::exBarKey,"`toberemove` + value ");
	var_Items->RemoveBar(0,"<toberemove*>");
	OutputDebugStringW( L"Bars after remove: " );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<*>",EXG2ANTTLib::exBarsCount)) );
spG2antt1->EndUpdate();

1935
Is it possible to automatically color the bar being checked

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
}

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%CS0","check");
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutApplyToBars(L"Task");
	var_ConditionalFormat->PutBarColor(RGB(0,0,1));
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutWidth(256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(spG2antt1->GetConditionalFormats()->GetItem("check")->GetExpression())))->PutFormatColumn(spG2antt1->GetConditionalFormats()->GetItem("check")->GetExpression());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2017,1,2,0,00,00).operator DATE(),COleDateTime(2017,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Item 2");
	var_Items->AddBar(h,"Task",COleDateTime(2017,1,3,0,00,00).operator DATE(),COleDateTime(2017,1,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(h,long(0),1);
	h = var_Items->AddItem("Item 3");
	var_Items->AddBar(h,"Task",COleDateTime(2017,1,4,0,00,00).operator DATE(),COleDateTime(2017,1,14,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(h,long(0),1);
spG2antt1->EndUpdate();

1934
How do I automatically bold items being checked

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
}

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%CS0","check");
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items")))->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(spG2antt1->GetConditionalFormats()->GetItem("check")->GetExpression())))->PutFormatColumn(spG2antt1->GetConditionalFormats()->GetItem("check")->GetExpression());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->PutCellState(var_Items->AddItem("Item 2"),long(0),1);
	var_Items->AddItem("Item 3");
spG2antt1->EndUpdate();

1933
Can I display the radio-button with a solid color

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutRadioImage(VARIANT_FALSE,32699122);
spG2antt1->PutRadioImage(VARIANT_TRUE,16777216);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Check")))->PutDef(EXG2ANTTLib::exCellHasRadioButton,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Radio 1");
	var_Items->PutCellState(var_Items->AddItem("Radio 2"),long(0),1);
	var_Items->AddItem("Radio 1");
spG2antt1->EndUpdate();

1932
Can I display the check-box with a solid color

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutCheckImage(EXG2ANTTLib::Unchecked,32699122);
spG2antt1->PutCheckImage(EXG2ANTTLib::Checked,16777216);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Check")))->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Check 1");
	var_Items->PutCellState(var_Items->AddItem("Check 2"),long(0),1);
	var_Items->AddItem("Check 3");
spG2antt1->EndUpdate();

1931
How can I use the CellState with ConditionalFormat/ComputedField/FormatColumn

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
}

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exGroupLinesInsideLeaf);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Format")));
	var_Column1->PutFormatColumn(L"%CS0");
	var_Column1->PutCaption(var_Column1->GetFormatColumn());
	var_Column1->PutDef(EXG2ANTTLib::exCellForeColor,long(8421504));
	var_Column1->PutDef(EXG2ANTTLib::exHeaderForeColor,var_Column1->GetDef(EXG2ANTTLib::exCellForeColor));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Item 1");
	var_Items->PutCellState(var_Items->InsertItem(h,vtMissing,"Item 2"),long(0),1);
	var_Items->PutCellState(var_Items->InsertItem(h,vtMissing,"Item 3"),long(0),1);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1930
How can I use the CellData with ConditionalFormat/ComputedField/FormatColumn

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->GetColumns()->Add(L"Items");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Format")));
	var_Column->PutFormatColumn(L"%CD0");
	var_Column->PutCaption(var_Column->GetFormatColumn());
	var_Column->PutDef(EXG2ANTTLib::exCellForeColor,long(8421504));
	var_Column->PutDef(EXG2ANTTLib::exHeaderForeColor,var_Column->GetDef(EXG2ANTTLib::exCellForeColor));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellData(var_Items->AddItem("Item 1"),long(0),long(1234));
	var_Items->PutCellData(var_Items->AddItem("Item 2"),long(0),"this is just an user data");
	var_Items->PutCellData(var_Items->AddItem("Item 3"),long(0),COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1929
How can I use the CellValue/CellCaption with ConditionalFormat/ComputedField/FormatColumn

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items")));
	EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
		var_Editor->AddItem(1,L"Item 1",vtMissing);
		var_Editor->AddItem(2,L"Item 2",vtMissing);
		var_Editor->AddItem(3,L"Item 3",vtMissing);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Format")));
	var_Column1->PutFormatColumn(L"%0");
	var_Column1->PutCaption(var_Column1->GetFormatColumn());
	var_Column1->PutDef(EXG2ANTTLib::exCellForeColor,long(8421504));
	var_Column1->PutDef(EXG2ANTTLib::exHeaderForeColor,var_Column1->GetDef(EXG2ANTTLib::exCellForeColor));
	var_Column1->PutAllowSizing(VARIANT_FALSE);
EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Format")));
	var_Column2->PutFormatColumn(L"%C0");
	var_Column2->PutCaption(var_Column2->GetFormatColumn());
	var_Column2->PutDef(EXG2ANTTLib::exCellForeColor,long(8421504));
	var_Column2->PutDef(EXG2ANTTLib::exHeaderForeColor,var_Column2->GetDef(EXG2ANTTLib::exCellForeColor));
	var_Column2->PutAllowSizing(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->PutCellValue(var_Items->AddItem(long(0)),long(0),long(2));
	var_Items->AddItem(long(2));
spG2antt1->EndUpdate();

1928
How can I use the ShowNonworkingHours property (hide the non-working hours)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutNonworkingHours(16253183);
	var_Chart->PutShowNonworkingHours(VARIANT_FALSE);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
spG2antt1->EndUpdate();

1927
How can I use the ShowNonworkingDates property (hide the non-working days)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
spG2antt1->EndUpdate();

1926
How can I show/hide bars once the user checks or un-checks a column

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarTransparent,"cellstate(0) = 1 ? 0 : 100");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarTransparent,"cellstate(0) = 1 ? 0 : 100");
spG2antt1->EndUpdate();

1925
How can I change the color for all Task bars

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("itembar(0) = `Task`",EXG2ANTTLib::exBarColor,long(65280));
spG2antt1->EndUpdate();

1924
Is it possible to automatically select bars only when user selects a new item

// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarSelected,"itemisselected");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowSelectObjects(EXG2ANTTLib::exNoSelectObjects);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1923
Is it possible to automatically select bars only when the user clicks the column's checkbox

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarSelected,"cellstate(0) = 1");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowSelectObjects(EXG2ANTTLib::exNoSelectObjects);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1922
How do I select all bars on leaf items

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("itemlevel = 1",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1921
How can I change the caption for all checked Task bars

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("(cellstate(0) = 1) and (itembar(0) = `Task`)",EXG2ANTTLib::exBarCaption,"`new caption`");
spG2antt1->EndUpdate();

1920
How can I change the caption for all Task bars

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("(itembar(0) = `Task`)",EXG2ANTTLib::exBarCaption,"`new caption`");
spG2antt1->EndUpdate();

1919
How can I change the caption for all bars

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarCaption,"`new caption`");
spG2antt1->EndUpdate();

1918
How can I move all Task bars to end at the same date time

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("(itembar(0) = `Task`)",EXG2ANTTLib::exBarMove,"#8/14/2017# - itembar(2)");
spG2antt1->EndUpdate();

1917
How can I move all Task bars to start at the same date time

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("(itembar(0) = `Task`)",EXG2ANTTLib::exBarMove,"#8/3/2017# - itembar(1)");
spG2antt1->EndUpdate();

1916
How can I change the color for checked Task bars

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("cellstate(0) = 1 and itembar(0) = `Task`",EXG2ANTTLib::exBarColor,long(255));
spG2antt1->EndUpdate();

1915
How do I resize all Task bars programatically

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("itembar(0) = `Task`",EXG2ANTTLib::exBarEnd,"value + 2");
spG2antt1->EndUpdate();

1914
How do I move just the checked Task bars in the chart

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("cellstate(0) = 1 and itembar(0) = `Task`",EXG2ANTTLib::exBarMove,long(-2));
spG2antt1->EndUpdate();

1913
How do I move all Task bars in the chart

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("itembar(0) = `Task`",EXG2ANTTLib::exBarMove,long(1));
spG2antt1->EndUpdate();

1912
How do I count all Task bars in the chart
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	OutputDebugStringW( _bstr_t(var_Items->GetItemBarEx("itembar(0) = `Task`",EXG2ANTTLib::exBarsCount)) );
spG2antt1->EndUpdate();

1911
How do I select bars whose items are checked

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("cellstate(0) = 1",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1910
How can I select all bars, where a specified column matches a specified criteria

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,48);
spG2antt1->GetChart()->PutSelBarColor(RGB(255,0,0));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2","K2");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"P","P");
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"Q","Q");
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"M","M");
	var_Items->PutItemBarEx("cellcaption(0) = `Task 1`",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1909
How can I select/unselect all bars

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,48);
spG2antt1->GetChart()->PutSelBarColor(RGB(255,0,0));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2","K2");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"P","P");
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"Q","Q");
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"M","M");
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1908
Is it possible to set the background color of the chart for one item and one day
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Items");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item");
	long h = var_Items->AddItem("Item");
	var_Items->AddBar(h,"",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,3,0,00,00).operator DATE(),"Back"," ");
	var_Items->PutItemBar(h,"Back",EXG2ANTTLib::exBarBackColor,long(255));
	var_Items->PutItemBar(h,"Back",EXG2ANTTLib::exBarSelectable,VARIANT_FALSE);
	var_Items->AddItem("Item");
spG2antt1->EndUpdate();

1907
It is possible to search for an item ( inside the Editor ), case insensitive

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"DropDownList")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
	var_Editor->AddItem(1,L"One",vtMissing);
	var_Editor->AddItem(2,L"Two",vtMissing);
	var_Editor->AddItem(3,L"Three",vtMissing);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(spG2antt1->GetColumns()->GetItem(long(0))->GetEditor()->GetFindItem(">ONE"));
	var_Items->AddItem(spG2antt1->GetColumns()->GetItem(long(0))->GetEditor()->GetFindItem(">ThRee"));
	var_Items->AddItem(spG2antt1->GetColumns()->GetItem(long(0))->GetEditor()->GetFindItem("ONE"));
	var_Items->AddItem(spG2antt1->GetColumns()->GetItem(long(0))->GetEditor()->GetFindItem(">tWo"));
spG2antt1->EndUpdate();

1906
The text after the BR-tag is in same line as the text before the BR-tag (entire column)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Default")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
	var_Column->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("This is the first line.<br>This is the second line.");
	var_Items->AddItem("This is the first line.<br>This is the second line.");
	var_Items->AddItem("This is the first line.<br>This is the second line.");
spG2antt1->EndUpdate();

1905
The text after the BR-tag is in same line as the text before the BR-tag (individual)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->GetColumns()->Add(L"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValueFormat(var_Items->AddItem("This is the first line.<br>This is the second line."),long(0),EXG2ANTTLib::exHTML);
	long h = var_Items->AddItem("<b>This is the first line.<br>This is the second line.</b>");
	var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML);
	var_Items->PutCellSingleLine(h,long(0),EXG2ANTTLib::exCaptionWordWrap);
	var_Items->PutCellValueFormat(var_Items->AddItem("This is the first line.<br>This is the second line."),long(0),EXG2ANTTLib::exHTML);
spG2antt1->EndUpdate();

1904
How do I prevent showing the control's BackColorAlternate property on empty / non-items part of the control

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->PutBackColorAlternate(0x7ff0f0f0);
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 4"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 5"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1903
Can I disable an item once the user selects a new value into a different item

// Change event - Occurs when the user changes the cell's content.
void OnChangeG2antt1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutEnableItem(var_Items->GetItemByIndex(1),VARIANT_FALSE);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->FreezeEvents(VARIANT_TRUE);
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
spG2antt1->GetColumns()->Add(L"Q");
spG2antt1->GetColumns()->Add(L"A");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("What's your gender?");
	EXG2ANTTLib::IEditorPtr var_Editor = var_Items->GetCellEditor(h1,long(1));
		var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
		var_Editor->AddItem(1,L"Male",vtMissing);
		var_Editor->AddItem(0,L"Female",vtMissing);
	var_Items->PutCellValue(h1,long(1),long(1));
	long h2 = var_Items->AddItem("What's pet name?");
	var_Items->PutCellValue(h2,long(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
	var_Items->PutCellSingleLine(h2,long(1),EXG2ANTTLib::exCaptionWordWrap);
spG2antt1->EndUpdate();
spG2antt1->FreezeEvents(VARIANT_FALSE);

1902
How can I get a row expanded / enlarged to fit the cell's text (entire column)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
spG2antt1->GetColumns()->Add(L"Q");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"A")));
	var_Column->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE);
	EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXG2ANTTLib::MemoType);
		var_Editor->PutAppearance(EXG2ANTTLib::SingleApp);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("What's name?");
	var_Items->PutCellValue(h1,long(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
	long h2 = var_Items->AddItem("What's your pet name?");
	var_Items->PutCellValue(h2,long(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
spG2antt1->EndUpdate();

1901
How can I get a row expanded / enlarged to fit the cell's text (individual cell)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
spG2antt1->GetColumns()->Add(L"Q");
spG2antt1->GetColumns()->Add(L"A");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("What's name?");
	var_Items->PutCellValue(h1,long(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
	long h2 = var_Items->AddItem("What's your pet name?");
	EXG2ANTTLib::IEditorPtr var_Editor = var_Items->GetCellEditor(h2,long(1));
		var_Editor->PutEditType(EXG2ANTTLib::MemoType);
		var_Editor->PutAppearance(EXG2ANTTLib::SingleApp);
	var_Items->PutCellValue(h2,long(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
	var_Items->PutCellSingleLine(h2,long(1),EXG2ANTTLib::exCaptionWordWrap);
spG2antt1->EndUpdate();